package com.xbs.controller.backstage;

import java.io.IOException;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.xbs.controller.base.BaseServlet;
import com.xbs.entity.ConsumerEntity;
import com.xbs.service.user.ConsumerService;
import com.xbs.utils.DateJsonValueProcessor;

import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
import net.sf.json.JsonConfig;
import net.sf.json.util.CycleDetectionStrategy;


/**
 * 普通用户
 * @author Administrator
 *
 */
@WebServlet("/backstage/consumer3")
public class Consumer3Servlet extends BaseServlet{

	@Override
	protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
		doPost(req, resp);
	}
	
	@Override
	protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
		String idcard1 = req.getParameter("idcard1");
		String name1 = req.getParameter("name1");
		String telphone1 = req.getParameter("telphone1");
		String password1 = req.getParameter("password1");
		String paypassword1 = req.getParameter("paypassword1");
		String email1 = req.getParameter("email1");
		ConsumerService consumerservice = new ConsumerService();
		consumerservice.update(name1, idcard1, telphone1, password1, paypassword1, email1);
		req.getRequestDispatcher("/backstage/consumer").forward(req, resp);
	}
}
